package day03;

public class ArrayTest3 {                       //数组倒置并打印
    public static void main(String[] args) {
        int[] arr = {1,2,3,4,5};
        int[] arr2=new int[arr.length];
        for (int i = 0; i < arr.length; i++) arr2[i] = arr[4-i];
        for (int i = 0; i < arr2.length; i++) System.out.print(arr2[i]+" ");
    }
}